Optimal. Leaf size=55 \[ \frac {(a-b)^2 \text {ArcTan}(\sinh (c+d x))}{d}+\frac {(2 a-b) b \sinh (c+d x)}{d}+\frac {b^2 \sinh ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3269, 398, 209}
\begin {gather*} \frac {(a-b)^2 \text {ArcTan}(\sinh (c+d x))}{d}+\frac {b (2 a-b) \sinh (c+d x)}{d}+\frac {b^2 \sinh ^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 398
Rule 3269
Rubi steps
\begin {align*} \int \text {sech}(c+d x) \left (a+b \sinh ^2(c+d x)\right )^2 \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left ((2 a-b) b+b^2 x^2+\frac {(a-b)^2}{1+x^2}\right ) \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {(2 a-b) b \sinh (c+d x)}{d}+\frac {b^2 \sinh ^3(c+d x)}{3 d}+\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {(a-b)^2 \tan ^{-1}(\sinh (c+d x))}{d}+\frac {(2 a-b) b \sinh (c+d x)}{d}+\frac {b^2 \sinh ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 70, normalized size = 1.27 \begin {gather*} \frac {\sinh (c+d x) \left (\frac {3 (a-b)^2 \tanh ^{-1}\left (\sqrt {-\sinh ^2(c+d x)}\right )}{\sqrt {-\sinh ^2(c+d x)}}+b \left (6 a+b \left (-3+\sinh ^2(c+d x)\right )\right )\right )}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.98, size = 70, normalized size = 1.27
method | result | size |
derivativedivides | \(\frac {2 a^{2} \arctan \left ({\mathrm e}^{d x +c}\right )+2 a b \left (\sinh \left (d x +c \right )-2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )+b^{2} \left (\frac {\left (\sinh ^{3}\left (d x +c \right )\right )}{3}-\sinh \left (d x +c \right )+2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) | \(70\) |
default | \(\frac {2 a^{2} \arctan \left ({\mathrm e}^{d x +c}\right )+2 a b \left (\sinh \left (d x +c \right )-2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )+b^{2} \left (\frac {\left (\sinh ^{3}\left (d x +c \right )\right )}{3}-\sinh \left (d x +c \right )+2 \arctan \left ({\mathrm e}^{d x +c}\right )\right )}{d}\) | \(70\) |
risch | \(\frac {{\mathrm e}^{3 d x +3 c} b^{2}}{24 d}+\frac {a b \,{\mathrm e}^{d x +c}}{d}-\frac {5 \,{\mathrm e}^{d x +c} b^{2}}{8 d}-\frac {{\mathrm e}^{-d x -c} a b}{d}+\frac {5 \,{\mathrm e}^{-d x -c} b^{2}}{8 d}-\frac {{\mathrm e}^{-3 d x -3 c} b^{2}}{24 d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a^{2}}{d}-\frac {2 i \ln \left ({\mathrm e}^{d x +c}+i\right ) a b}{d}+\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) b^{2}}{d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a^{2}}{d}+\frac {2 i \ln \left ({\mathrm e}^{d x +c}-i\right ) a b}{d}-\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) b^{2}}{d}\) | \(207\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 133 vs.
\(2 (53) = 106\).
time = 0.49, size = 133, normalized size = 2.42 \begin {gather*} -\frac {1}{24} \, b^{2} {\left (\frac {{\left (15 \, e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )} e^{\left (3 \, d x + 3 \, c\right )}}{d} - \frac {15 \, e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d} + \frac {48 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d}\right )} + a b {\left (\frac {4 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (d x + c\right )}}{d} - \frac {e^{\left (-d x - c\right )}}{d}\right )} + \frac {a^{2} \arctan \left (\sinh \left (d x + c\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 446 vs.
\(2 (53) = 106\).
time = 0.39, size = 446, normalized size = 8.11 \begin {gather*} \frac {b^{2} \cosh \left (d x + c\right )^{6} + 6 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + b^{2} \sinh \left (d x + c\right )^{6} + 3 \, {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + 3 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{2} + 8 \, a b - 5 \, b^{2}\right )} \sinh \left (d x + c\right )^{4} + 4 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{3} + 3 \, {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} - 3 \, {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 3 \, {\left (5 \, b^{2} \cosh \left (d x + c\right )^{4} + 6 \, {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} - 8 \, a b + 5 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} - b^{2} + 48 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right ) + 3 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + {\left (a^{2} - 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{3}\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 6 \, {\left (b^{2} \cosh \left (d x + c\right )^{5} + 2 \, {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} - {\left (8 \, a b - 5 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )}{24 \, {\left (d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )^{2} \sinh \left (d x + c\right ) + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + d \sinh \left (d x + c\right )^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sinh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 102, normalized size = 1.85 \begin {gather*} \frac {b^{2} e^{\left (3 \, d x + 3 \, c\right )} + 24 \, a b e^{\left (d x + c\right )} - 15 \, b^{2} e^{\left (d x + c\right )} + 48 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \arctan \left (e^{\left (d x + c\right )}\right ) - {\left (24 \, a b e^{\left (2 \, d x + 2 \, c\right )} - 15 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + b^{2}\right )} e^{\left (-3 \, d x - 3 \, c\right )}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.17, size = 182, normalized size = 3.31 \begin {gather*} \frac {b^2\,{\mathrm {e}}^{3\,c+3\,d\,x}}{24\,d}-\frac {b^2\,{\mathrm {e}}^{-3\,c-3\,d\,x}}{24\,d}-\frac {{\mathrm {e}}^{-c-d\,x}\,\left (8\,a\,b-5\,b^2\right )}{8\,d}+\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (a^2\,\sqrt {d^2}+b^2\,\sqrt {d^2}-2\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {a^4-4\,a^3\,b+6\,a^2\,b^2-4\,a\,b^3+b^4}}\right )\,\sqrt {a^4-4\,a^3\,b+6\,a^2\,b^2-4\,a\,b^3+b^4}}{\sqrt {d^2}}+\frac {b\,{\mathrm {e}}^{c+d\,x}\,\left (8\,a-5\,b\right )}{8\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________